-
-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUGFIX] Use absolute file path without project prefix #4292
Conversation
@simonschaufi |
As you can see, this is actually a fix for another issue. I wonder why you define the path in the cli and not in rector config? |
For normal rector execution, I don't need to specify the path in the rector config. I searched the rector.php examples for both rector and typo3-rector and could not find a way to define the path. |
You don't specify the root path but only the paths in which rector should run, see: |
This is a really good piece of info :) We have a helper in the paths and give all files individually to rector: $rectorConfig->paths(
array_filter(explode("\n", (string)shell_exec("git ls-files | xargs ls -d 2>/dev/null | grep -E '\.(php)$'")))
); It works as you said if I just set the path a directory. $rectorConfig->paths(
[__DIR__ . '/src/']
); But this is not nice if we only have the option to define paths if we want to use typo3-rector. This also applies to the rector command if you add a filename as a parameter. Then I still get the error `Unable to create directory at /src/extensions/test_extension/Configuration/TCA/Overrides. mkdir(): Permission denied'. This is also a problem if I only set the directory in the rector config. @simonschaufi can we have the |
If getcwd breaks the code, then we should find another solution or a real fix that doesn't break but I'm not motivated to spend time in this right now as defining the paths works great. |
I have written a summary in the issue #4301 |
Resolves: #4291